import '@/assets/css/layout.scss'

import { createApp } from 'vue'
import router from './router'
import store from './store'
import axios from 'axios'
import VueAxios from 'vue-axios'
import Plugins from '@/plugins'
import App from './App.vue'

// 导入所有element icon图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

// app.config.globalProperties.$mitt = mitt()
// 全局注册element-plus icon图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}

// app.use(createPinia())
app.use(router)
.use(store)
.use(VueAxios, axios)
.use(Plugins, {test: 'Vue plugins, url: @/common/plugins'})
.mount('#app')

export default app